package com.n9.qq.android.firendlist;

import com.qq.taf.jce.JceInputStream;
import com.qq.taf.jce.JceOutputStream;
import com.qq.taf.jce.JceStruct;

import java.util.ArrayList;

/**
 * @author ice
 * @since 2019/2/22 17:11
 */
public class GetTroopListRespV2 extends JceStruct {
    public short errorCode = 0;
    public int result = 0;
    public short troopcount = 0;
    public long uin = 0L;
    public byte[] vecCookies = null;
    public ArrayList vecFavGroup = null;
    public ArrayList vecTroopList = null;
    public ArrayList vecTroopListDel = null;
    public ArrayList vecTroopRank = null;

    public GetTroopListRespV2() {
    }

    public GetTroopListRespV2(long var1, short var3, int var4, short var5, byte[] var6, ArrayList var7, ArrayList var8, ArrayList var9, ArrayList var10) {
        this.uin = var1;
        this.troopcount = var3;
        this.result = var4;
        this.errorCode = var5;
        this.vecCookies = var6;
        this.vecTroopList = var7;
        this.vecTroopListDel = var8;
        this.vecTroopRank = var9;
        this.vecFavGroup = var10;
    }

    @Override
    public void readFrom(JceInputStream var1) {
        this.uin = var1.read(this.uin, 0, true);
        this.troopcount = var1.read(this.troopcount, 1, true);
        this.result = var1.read(this.result, 2, true);
        this.errorCode = var1.read(this.errorCode, 3, false);
        if (vecCookies == null) {
            vecCookies = new byte[1];
        }

        this.vecCookies = var1.read(vecCookies, 4, false);
        stTroopNum var2;
        if (vecTroopList == null) {
            vecTroopList = new ArrayList();
            var2 = new stTroopNum();
            vecTroopList.add(var2);
        }

        this.vecTroopList = (ArrayList)var1.read(vecTroopList, 5, false);
        if (vecTroopListDel == null) {
            vecTroopListDel = new ArrayList();
            var2 = new stTroopNum();
            vecTroopListDel.add(var2);
        }

        this.vecTroopListDel = (ArrayList)var1.read(vecTroopListDel, 6, false);
        if (vecTroopRank == null) {
            vecTroopRank = new ArrayList();
            stGroupRankInfo var3 = new stGroupRankInfo();
            vecTroopRank.add(var3);
        }

        this.vecTroopRank = (ArrayList)var1.read(vecTroopRank, 7, false);
        if (vecFavGroup == null) {
            vecFavGroup = new ArrayList();
            stFavoriteGroup var4 = new stFavoriteGroup();
            vecFavGroup.add(var4);
        }
        this.vecFavGroup = (ArrayList)var1.read(vecFavGroup, 8, false);
    }

    @Override
    public void writeTo(JceOutputStream var1) {
        var1.write(this.uin, 0);
        var1.write(this.troopcount, 1);
        var1.write(this.result, 2);
        var1.write(this.errorCode, 3);
        if (this.vecCookies != null) {
            var1.write(this.vecCookies, 4);
        }

        if (this.vecTroopList != null) {
            var1.write(this.vecTroopList, 5);
        }

        if (this.vecTroopListDel != null) {
            var1.write(this.vecTroopListDel, 6);
        }

        if (this.vecTroopRank != null) {
            var1.write(this.vecTroopRank, 7);
        }

        if (this.vecFavGroup != null) {
            var1.write(this.vecFavGroup, 8);
        }

    }
}
